Learn R Programming

bioRad (version 0.6.2)

[.vpts: Subset a time series of vertical profiles (vpts)

Description

Select a vertical profile (vp) or a time series of vertical profiles (vpts) by index from a vpts.

Usage

# S3 method for vpts
[(x, i)

Value

A vpts object containing a subset of vertical profiles (vp) or a vp object when subsetting a single vertical profile (vp).

Arguments

x

A vpts object.

i

Integer. Index/indices specifying which range of vertical profiles to extract.

Examples

Run this code
# The example vpts contains 1934 profiles (i.e. datetimes)
dim(example_vpts)

# Subset vpts to extract 10th profile
example_vpts[10] # A vp object

# Subset vpts to extract the 20th to 100th profile
example_vpts[20:100] # A vpts object with 81 profiles

# Subset vpts to remove the first 10 profiles
example_vpts[-1:-10] # A vpts object with 10 less profiles

Run the code above in your browser using DataLab